import request from '@/utils/request'

// 查询出库提单列表
export function listPick(query) {
  return request({
    url: '/exitwarehouse/exit/list',
    method: 'get',
    params: query
  })
}

// 查询出库提单详细
export function getPick(exitWarehouseId) {
  return request({
    url: '/exitwarehouse/exit/' + exitWarehouseId,
    method: 'get'
  })
}

// 新增出库提单
export function addPick(data) {
  return request({
    url: '/exitwarehouse/exit',
    method: 'post',
    data: data
  })
}

// 修改出库提单
export function updatePick(data) {
  return request({
    url: '/exitwarehouse/exit',
    method: 'put',
    data: data
  })
}

// 删除出库提单
export function delPick(exitWarehouseId) {
  return request({
    url: '/exitwarehouse/exit/' + exitWarehouseId,
    method: 'delete'
  })
}

// 生成出库计划
export function createExitWarehousePlan(data) {
  return request({
    url: '/exitwarehouse/exit/createplan',
    method: 'put',
    data: data
  })
}
